﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Maintainance/Maintainance.master" AutoEventWireup="true" CodeBehind="Comments.aspx.cs" Inherits="OpenPhotoAlbum.Maintainance.Comments" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ph1" runat="server">
	<asp:UpdatePanel ID="updatePanel" runat="server">
		<ContentTemplate>
			<asp:GridView ID="gridView" runat="server" AllowPaging="True" 
				AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="CommentId" 
				DataSourceID="LinqDataSource1" Width="100%" PageSize="20">
				<Columns>
					<asp:BoundField DataField="CommentContent" HeaderText="CommentContent" 
						SortExpression="CommentContent" />
					<asp:BoundField DataField="CommentDateTime" HeaderText="CommentDateTime" 
						SortExpression="CommentDateTime" />
					<asp:TemplateField HeaderText="User" SortExpression="UserId">
						<ItemTemplate>
							<asp:HyperLink ID="hlUser" runat="server" Target="_blank"></asp:HyperLink>
						</ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Photo">
						<ItemTemplate>
							<asp:HyperLink ID="hlPhoto" runat="server" Target="_blank"></asp:HyperLink>
						</ItemTemplate>
					</asp:TemplateField>
					<asp:BoundField DataField="IpAddress" HeaderText="IpAddress" 
						SortExpression="IpAddress" />
					<asp:CommandField ShowDeleteButton="True" ButtonType="Link" >
					</asp:CommandField>
				</Columns>
				<PagerSettings Position="TopAndBottom" />
				<PagerStyle Font-Size="Large" />
				<HeaderStyle HorizontalAlign="Left" />
			</asp:GridView>
			<asp:LinqDataSource ID="LinqDataSource1" runat="server" 
				ContextTypeName="OpenPhotoAlbum.DbAccess.DbLinqClassesDataContext" 
				OrderBy="CommentDateTime desc" TableName="Comments" EnableDelete="True">
			</asp:LinqDataSource>
		</ContentTemplate>
	</asp:UpdatePanel>
</asp:Content>
